package com.lujieni.springbootlearn.service.impl;
import org.springframework.stereotype.Service;

/**
 *
 * spring中bean注入的三种方式
 * 1.字段注入
 * 2.构造器注入
 * 3.setter方法注入
 *
 */
@Service
public class HelloService {

    private AnotherService anotherService;

    public HelloService(AnotherService as){
        this.anotherService = as;
    }

    public String hello(){
        return anotherService.generateMsg();
    }



}
